#if !defined(MGOPTIONIMPL_H__INCLUDED)
#define MGOPTIONIMPL_H__INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MGOption.h : header file
//

#include "MGOption.h"

/**
 *	CMGOption class
 *
 */
class CMGOptionImpl
{
protected:
	CMGOptionImpl();

	void Cleanup() { /*NOP*/ };
	
public:
	BOOL EnableAutoloadingOnStartup(BOOL bEnable = TRUE);
	BOOL IsAutoLoadingOnStartup() const;

	BOOL EnableMG(BOOL bEnable = TRUE);
	BOOL IsMGEnabled() const;

	UINT SetPageTopBottomRecognitionArea(UINT nPageTopBottomRecognitionArea = 5);
	UINT GetPageTopBottomRecognitionArea() const;

	BOOL EnablePageTopBottom(BOOL bEnable);
	BOOL IsPageTopBottom() const;

	BOOL EnablePageUpDown(BOOL bEnable);
	BOOL IsPageUpDown() const;

	BOOL EnableDblClkScrolling(BOOL bEnable);
	BOOL IsDblClkScrollingEnabled() const;
	
	BOOL UseMiddleButtonForDblClkScrolling(BOOL bUse);
	BOOL IsMiddleButtonForDblClkScrolling() const;
	
	/// the minimum amount of pixels over which it is required to move to be recognize as a gesture (default = 15 pixels)
	UINT GetGestureRecognitionSensitivity() const;
	UINT SetGestureRecognitionSensitivity(UINT nSensitivity = 15);

	/// if set, the main application will not have chance to handle, nor even to see the Mouse Gesture Activation Button down message (WM_BUTTONDOWN)
	BOOL EnablePreemptiveMGAButtonAlways(BOOL bEnable = TRUE);
	BOOL IsPreemptiveMGAButtonAlways() const;
	
	enum MG::Button GetMGAButton() const;
	UINT SetMGAButton(UINT nButton);
	UINT SetMGAButton(enum MG::Button button);
	
	/// VK_SHIFT, VK_CONTROL or VK_MENU
	int SetMGSuspendingKey(int nVirtualKey);
	int SetMGSuspendingKey(enum MG::VirtualKey VirtualKey);
	int GetMGSuspendingKey() const;

	BOOL EnableMGSuspendingKey(BOOL bEnable = TRUE);
	BOOL IsMGSuspendingKeyEnabled() const;
	
	/// same direction repeat detection rate in msec (default = 300 ms)
	UINT GetDetectingRepeatedSameDirectionRate() const;
	UINT SetDetectingRepeatedSameDirectionRate(UINT nRate = 300);

	/// show the entered mouse gesture on status bar
	BOOL EnableShowRecognitionOnStatusBar(BOOL bEnable = TRUE);
	BOOL IsShowRecognitionOnStatusBar() const;
	
	/// show the target window's class name on status bar
	BOOL EnableIdentifyTargetWindowClass(BOOL bEnable = TRUE);
	BOOL IsIdentifyTargetWindowClass() const;
	
	/// enable help tips (default popup delay time = 2000 ms)
	BOOL EnableHelpTip(BOOL bEnable = TRUE);
	BOOL IsHelpTipEnabled() const;
	UINT SetDelayTimeHelpTip(UINT nMilliseconds = 2000);
	UINT GetDelayTimeHelpTip() const;

public:
	void UpdateRegistry(BOOL bSaveAndValidate = TRUE);
};

/////////////////////////////////////////////////////////////////////////////

#endif // !defined(MGOPTIONIMPL_H__INCLUDED)
